package main.Q2601_2700;

public class Q2641_2650 {
	public static void main(String[] args) {
		System.out.println("Question2641：");
		System.out.println("Question2642：");
		System.out.println("Question2643：一最多的行");
		System.out.println("Question2644：");
		System.out.println("Question2645：");
		System.out.println("Question2646：");
		System.out.println("Question2647：");
		System.out.println("Question2648：");
		System.out.println("Question2649：");
		System.out.println("Question2650：");
	}
}

class Question2643 {
	public int[] rowAndMaximumOnes(int[][] mat) {
		int[] sums = new int[mat.length];
		for (int i = 0; i < mat.length; i++) {
			int sum = 0;
			for (int j = 0; j < mat[0].length; j++) sum += mat[i][j];
			sums[i] = sum;
		}
		int minRow = 0, maxSum = 0;
		for (int i = 0; i < mat.length; i++) {
			if (sums[i] > maxSum) {
				minRow = i;
				maxSum = sums[i];
			}
		}
		return new int[]{minRow, maxSum};
	}
}